package com.bigstar.lolen_e;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListActivity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

public class BuilderItem extends ListActivity implements OnClickListener{
	
	public static int[] item_id = {-1,-1,-1,-1,-1,-1};
	
	public static int[] item_gold = {0,0,0,0,0,0};
	String items[] = new String[6];
	
	ListAdapter la;
	
	int total_gold;
	public static ItemTemplate item_total_stat = new ItemTemplate();
	public static ItemTemplate item_stack_stat = new ItemTemplate();
	@Override 
	public void onCreate(Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState); 
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                    WindowManager.LayoutParams.FLAG_FULLSCREEN);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); 
        ChampionData.load(this);
        ItemData.load(this);
        Rune.load(this);
        la = new ListAdapter(this);
		setListAdapter(la);
		setContentView(R.layout.builder_item);
		Button b = (Button)findViewById(R.id.item_reset);
		b.setOnClickListener(this);
	}
	
	int item_position;
	
	@Override
    public void onListItemClick(ListView parent, View v, int position, long id) {
		Intent intent;
		if(item_id[position] == -1){
    		intent = new Intent(this, ItemMenu.class);
    		intent.putExtra("builder", "item_"+position);
    		this.startActivity(intent);
		}else{
			this.item_position = position;
			String name = ItemData.items.get(item_id[position]).name_en + " " +ItemData.items.get(item_id[position]).name_kor+
	        "("+ItemData.items.get(item_id[position]).price+"Gold)";
			String text =ItemData.items.get(item_id[position]).text;
			if(text == null || text.equals("")){
				text = "";
			}
			if(ItemData.items.get(item_id[position]).unique!=null){
				text = text + "\r\n" + ItemData.items.get(item_id[position]).unique;
			}
			new AlertDialog.Builder(this)
			.setIcon(R.drawable.item_000+item_id[position])
			.setTitle(name)
			.setMessage(text)
			.setPositiveButton("Item Remove", new DialogInterface.OnClickListener() {
				public void onClick(DialogInterface dialog, int whichButton) {
					item_id[item_position] = -1;
					item_gold[item_position] = 0;
					la.notifyDataSetChanged();
			    	total_gold = 0;
			    	for(int i = 0; i < 6; i++){
			    		total_gold += item_gold[i];	
			    	}
			    	TextView tv = (TextView)findViewById(R.id.item_total_gold);
			    	tv.setText("Total : "+total_gold+" Gold");
			    	total_gold = 0;
				}
			})
			.setNegativeButton("Close", new DialogInterface.OnClickListener() {
				public void onClick(DialogInterface dialog, int whichButton) {
				}
			}).create().show();	
		}
	}
	
    @Override
    protected void onResume() {
        ChampionData.load(this);
        ItemData.load(this);
        Rune.load(this);
    	super.onResume();
    	if(la != null){
        	la.notifyDataSetChanged();	
    	}
    	total_gold = 0;
    	for(int i = 0; i < 6; i++){
    		if(item_id[i] != -1){
    			item_gold[i] = ItemData.items.get(item_id[i]).price;
        		total_gold += item_gold[i];		
    		}
    	}
    	TextView tv = (TextView)findViewById(R.id.item_total_gold);
    	tv.setText("Total : "+total_gold+" Gold");
    	total_gold = 0;
    }
    
	 static class ViewHolder {
		 ImageView item_img;
		 TextView item_name;
		 TextView item_text;
			
		 //TextView tvGoodsLocation;
	 }
	
	class ListAdapter extends ArrayAdapter{
		Activity context;
		private LayoutInflater mInflater;
		public ListAdapter(Activity context){
			super(context, R.layout.item_info_row, items);
			this.context = context;
			 mInflater = LayoutInflater.from(context);
		}
		     
		public View getView(int position, View convertView, 
				ViewGroup parent){
			ViewHolder holder;
			if (convertView == null) {
				convertView = mInflater.inflate(R.layout.item_info_row, null); 
				holder = new ViewHolder();
				holder.item_name = (TextView)convertView.findViewById(R.id.item_name); 
				holder.item_text = (TextView)convertView.findViewById(R.id.item_text); 
				holder.item_img = (ImageView)convertView.findViewById(R.id.item_img); 
				convertView.setTag(holder);
			}else{
				holder = (ViewHolder) convertView.getTag();
			}
		      
			if(item_id[position] == -1){
				holder.item_name.setText("Please select an item");
				holder.item_text.setText("");
				holder.item_img.setImageResource(R.drawable.item_select);
			}else{
				String text = ItemData.items.get(item_id[position]).name_en + " " +
		        "("+ItemData.items.get(item_id[position]).price+"Gold)";
				holder.item_name.setText(text);
				if(ItemData.items.get(item_id[position]).text!=null){
					text =ItemData.items.get(item_id[position]).text;	
					if(ItemData.items.get(item_id[position]).unique!=null){
						text = text + "\r\n";
					}
				}else{
					text = "";
				}
				if(ItemData.items.get(item_id[position]).unique!=null){
					text = text + ItemData.items.get(item_id[position]).unique;
				}
				holder.item_text.setText(text);
				holder.item_img.setImageResource(R.drawable.item_000+item_id[position]);	
			}
			return convertView;
		}
	}

	@Override
	public void onClick(View v) {
		if(v.getId() == R.id.item_reset){
			AlertDialog.Builder alt_bld = new AlertDialog.Builder(this); 
			alt_bld.setMessage("Are you sure you want to initialize it?").setCancelable(false).
			setPositiveButton("Yes",  
			new DialogInterface.OnClickListener() {  
			public void onClick(DialogInterface dialog, int id) {
		    	for(int i = 0; i < 6; i++){
					item_id[i] = -1;
					item_gold[i] = 0;	
		    	}
				la.notifyDataSetChanged();
		    	total_gold = 0;
		    	TextView tv = (TextView)findViewById(R.id.item_total_gold);
		    	tv.setText("Total : 0 Gold");
				dialog.cancel();
			}}).setNegativeButton("No",  
			new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface dialog, int id) {
				dialog.cancel();
			}});  
			AlertDialog alert = alt_bld.create();  
			alert.setTitle("Item complete initialization");
			alert.show(); 
		}
	}
	
	public static void getStat(){
		item_total_stat.ap = 0;
		item_total_stat.armor = 0;
		item_total_stat.armor_pen = 0;
		item_total_stat.armor_pen_per = 0;
		item_total_stat.attack_speed = 0;
		item_total_stat.cooldown_reduction = 0;
		item_total_stat.cri_chance = 0;
		item_total_stat.damage = 0;
		item_total_stat.dodge = 0;
		item_total_stat.health = 0;
		item_total_stat.health_regen = 0;
		item_total_stat.life_steal = 0;
		item_total_stat.magic_pen = 0;
		item_total_stat.magic_pen_per = 0;
		item_total_stat.mana = 0;
		item_total_stat.mana_regen = 0;
		item_total_stat.move_speed = 0;
		item_total_stat.mr = 0;
		item_total_stat.spell_vamp = 0;
		item_total_stat.move_speed_per = 0;
		for(int i = 0; i < item_id.length; i++){
			if(item_id[i] != -1){
				item_total_stat.ap += ItemData.items.get(item_id[i]).ap;
				item_total_stat.armor += ItemData.items.get(item_id[i]).armor;
				item_total_stat.armor_pen += ItemData.items.get(item_id[i]).armor_pen;
				item_total_stat.armor_pen_per += ItemData.items.get(item_id[i]).armor_pen_per;
				item_total_stat.attack_speed += ItemData.items.get(item_id[i]).attack_speed;
				item_total_stat.cooldown_reduction += ItemData.items.get(item_id[i]).cooldown_reduction;
				item_total_stat.cri_chance += ItemData.items.get(item_id[i]).cri_chance;
				item_total_stat.damage += ItemData.items.get(item_id[i]).damage;
				item_total_stat.dodge += ItemData.items.get(item_id[i]).dodge;
				item_total_stat.health += ItemData.items.get(item_id[i]).health;
				item_total_stat.health_regen += ItemData.items.get(item_id[i]).health_regen;
				item_total_stat.life_steal += ItemData.items.get(item_id[i]).life_steal;
				item_total_stat.magic_pen += ItemData.items.get(item_id[i]).magic_pen;
				item_total_stat.magic_pen_per += ItemData.items.get(item_id[i]).magic_pen_per;
				item_total_stat.mana += ItemData.items.get(item_id[i]).mana;
				item_total_stat.mana_regen += ItemData.items.get(item_id[i]).mana_regen;
				item_total_stat.mr += ItemData.items.get(item_id[i]).mr;
				item_total_stat.spell_vamp += ItemData.items.get(item_id[i]).spell_vamp;
				if(item_total_stat.move_speed < ItemData.items.get(item_id[i]).move_speed){
					item_total_stat.move_speed = ItemData.items.get(item_id[i]).move_speed;
				}
				item_total_stat.move_speed_per += ItemData.items.get(item_id[i]).move_speed_per;
			}
		}
	}
	public static void addUniqueItem(Context context, LinearLayout layout, int index, String unique_text, boolean stack){
		if(!stack){
			return;
		}
		
		View v = (View) View.inflate(context, R.layout.item_info_row, null);
		TextView item_name =(TextView) v.findViewById(R.id.item_name);
		item_name.setText(ItemData.items.get(index).name_en +"("+ItemData.items.get(index).price+"Gold)");
		TextView item_text =(TextView) v.findViewById(R.id.item_text);
		item_text.setText(unique_text);
		
		ImageView item_img =(ImageView) v.findViewById(R.id.item_img);
		item_img.setImageResource(R.drawable.item_000+index);
		layout.addView(v);	
	}
	public static void addUniqueItemOfStack(Context context, LinearLayout layout, int index, String unique_text, boolean stack){
		if(!stack){
			return;
		}
		View v = (View) View.inflate(context, R.layout.builder_add_item, null);
		TextView item_name =(TextView) v.findViewById(R.id.item_name);
		item_name.setText(ItemData.items.get(index).name_en + " " +ItemData.items.get(index).name_kor+"("+ItemData.items.get(index).price+"Gold)");
		TextView item_text =(TextView) v.findViewById(R.id.item_text);
		item_text.setText(unique_text);
		
		ImageView item_img =(ImageView) v.findViewById(R.id.item_img);
		item_img.setImageResource(R.drawable.item_000+index);
		
		
		TextView stack_text =(TextView) v.findViewById(R.id.tv_stack_text);
		stack_text.setTag(index);
		
		
		Button stack_up =(Button) v.findViewById(R.id.btn_stack_up);
		stack_up.setTag(stack_text);
		
		stack_up.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				int itemId = (Integer)(((TextView)v.getTag()).getTag());
				int current = Integer.parseInt(((TextView)v.getTag()).getText().toString());
				if(ItemData.items.get(itemId).name_en.equals("Mejai's Soulstealer")){
					if(current < 20){
						current += 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.ap += 8;
						if(current >= 20){
							item_stack_stat.cooldown_reduction += 15;
						}
						BuilderChampion.instance.setStack();
					}	
				}else if(ItemData.items.get(itemId).name_en.equals("Sanguine Blade")){
					if(current < 7){
						current += 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.damage += 5;
			            int health = (int) (ChampionData.champions.get(BuilderChampion.champ_id).health + 
			            		ChampionData.champions.get(BuilderChampion.champ_id).health_per_level * BuilderChampion.level);
						item_stack_stat.health += health/100;
						BuilderChampion.instance.setStack();
					}
				}else if(ItemData.items.get(itemId).name_en.equals("Sword of the Occult")){
					if(current < 20){
						current += 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.damage += 5;
						if(current >= 20){
							item_stack_stat.move_speed_per += 15;
						}
						BuilderChampion.instance.setStack();
					}	
				}else if(ItemData.items.get(itemId).name_en.equals("Leviathan")){
					if(current < 20){
						current += 5;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.health += 160;
						BuilderChampion.instance.setStack();
					}	
				}else if(ItemData.items.get(itemId).name_en.equals("Guinsoo's Rageblade")){
					if(current < 8){
						current += 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.ap += 6;
						item_stack_stat.attack_speed += 4;
						BuilderChampion.instance.setStack();
					}	
				}else if(ItemData.items.get(itemId).name_en.equals("Rod of Ages")){
					if(current < 10){
						current += 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.health += 18;
						item_stack_stat.mana += 20;
						item_stack_stat.ap += 2;
						BuilderChampion.instance.setStack();
					}
				}else if(ItemData.items.get(itemId).name_en.equals("Warmog's Armor")){
					if(current < 10){
						current += 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.health += 35;
						item_stack_stat.health_regen += 1;
						BuilderChampion.instance.setStack();
					}
				}else if(ItemData.items.get(itemId).name_en.equals("The Bloodthirster")){
					if(current < 40){
						current += 10;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.damage += 10;
						item_stack_stat.life_steal += 2;
						BuilderChampion.instance.setStack();
					}
				}else if(ItemData.items.get(itemId).name_en.equals("Tear of the Goddess") || ItemData.items.get(itemId).name_en.equals("Manamune")
						|| ItemData.items.get(itemId).name_en.equals("Archangel's Staff")){
					if(current < 250){
						current += 25;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.mana += 100;
						BuilderChampion.instance.setStack();
					}
				}
			}
			
		});
		
		Button stack_down =(Button) v.findViewById(R.id.btn_stack_down);
		stack_down.setTag(stack_text);
		
		stack_down.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				int itemId = (Integer)(((TextView)v.getTag()).getTag());
				int current = Integer.parseInt(((TextView)v.getTag()).getText().toString());
				if(current > 0){
					if(ItemData.items.get(itemId).name_en.equals("Mejai's Soulstealer")){
						current -= 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.ap -= 8;
						if(current >= 19){
							item_stack_stat.cooldown_reduction -= 15;
						}
					}else if(ItemData.items.get(itemId).name_en.equals("Sanguine Blade")){
						current -= 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.damage -= 5;
			            int health = (int) (ChampionData.champions.get(BuilderChampion.champ_id).health + 
			            		ChampionData.champions.get(BuilderChampion.champ_id).health_per_level * BuilderChampion.level);
						item_stack_stat.health -= health/100;
					}else if(ItemData.items.get(itemId).name_en.equals("Sword of the Occult")){
						current -= 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.damage -= 5;
						if(current >= 19){
							item_stack_stat.move_speed_per -= 15;
						}
					}else if(ItemData.items.get(itemId).name_en.equals("Leviathan")){
						current -= 5;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.health -= 160;
					}else if(ItemData.items.get(itemId).name_en.equals("Guinsoo's Rageblade")){
						current -= 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.ap -= 6;
						item_stack_stat.attack_speed -= 4;
					}else if(ItemData.items.get(itemId).name_en.equals("Rod of Ages")){
						current -= 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.health -= 18;
						item_stack_stat.mana -= 20;
						item_stack_stat.ap -= 2;
					}else if(ItemData.items.get(itemId).name_en.equals("Warmog's Armor")){
						current -= 1;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.health -= 35;
						item_stack_stat.health_regen -= 1;
					}else if(ItemData.items.get(itemId).name_en.equals("The Bloodthirster")){
						current -= 10;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.damage -= 10;
						item_stack_stat.life_steal -= 2;
					}else if(ItemData.items.get(itemId).name_en.equals("Tear of the Goddess") || ItemData.items.get(itemId).name_en.equals("Manamune")
							|| ItemData.items.get(itemId).name_en.equals("Archangel's Staff")){
						current -= 25;
						((TextView)v.getTag()).setText(""+current);
						item_stack_stat.mana -= 100;
					}
					BuilderChampion.instance.setStack();
				}
			}
			
		});
		
		layout.addView(v);	
	}
	
	public static float TwoOptionItem(LinearLayout passive, LinearLayout active, LinearLayout aurora, Context context, String option, boolean stack){
		float stat = 0;
		if(option.equals("armor_pen")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("The Brutalizer")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+10% cooldown reduction, Unique: +15 armor penetration.", stack);
						break;
					}
				}
			}	
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Youmuu's Ghostblade")){
						stat += 20;
						break;
					}
				}
			}
		}else if(option.equals("armor_pen_per")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Last Whisper")){
						stat += 40;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+40% armor penetration", stack);
						break;
					}
				}
			}	
		}else if(option.equals("magic_pen")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Haunting Guise")){
						stat += 20;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+20 magic penetration", stack);
						break;
					}
				}
			}	
		}else if(option.equals("magic_pen_per")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Void Staff")){
						stat += 40;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+40% magic penetration.", stack);
						break;
					}
				}
			}
		}else if(option.equals("cooldown_reduction")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("The Brutalizer")){
						stat += 10;
						break;
					}
				}
			}	
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Athene's Unholy Grail")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+15% cooldown reduction, Restores 12% of your max mana on kill or assist. Increases your mana regeneration by 1% per 1% mana you are missing.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Kindlegem")){
						stat += 10;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+10% cooldown reduction", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Ionian Boots of Lucidity")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+15% cooldown reduction", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Stinger")){
						stat += 10;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+10% cooldown reduction", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Fiendish Codex")){
						stat += 10;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+10% cooldown reduction", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Glacial Shroud")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+15% cooldown reduction", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Spirit Visage")){
						stat += 10;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+10% cooldown reduction, Increases health gained yourself by healing, regeneration, life steal and spell vamp by 15%", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Shurelya's Reverie")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+15% cooldown reduction", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Nearby champions gain 40% movement speed for 3 seconds (60 second cooldown).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Soul Shroud")){
						stat += 10;
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby champions gain +10% cooldown reduction and +12 mana regeneration.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Morello's Evil Tome")){
						stat += 20;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+20% cooldown reduction", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Inflicts target enemy champion with Grievous Wound, causing 50% reduced healing and regeneration for 8 seconds(20 second cooldown).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Zeke's Herald")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+15% cooldown reduction", stack);
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby allied champions gain +20 attack speed and +12% life steal.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Deathfire Grasp")){
						addUniqueItem(context, active, BuilderItem.item_id[i], "Deals magic damage to target champion equal to 25% of their current health (+4% per 100 ability power) with a minimum of 200 damage. 1 minute cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Youmuu's Ghostblade")){
						stat += 15;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+15% cooldown reduction, +20 armor penetration", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Gain +50% attack speed and +20% movement speed for 4 seconds. Attacking enemies with melee basic attacks increases the duration by 2 seconds to a maximum of 8 seconds. 60 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Frozen Heart")){
						stat += 20;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+20% cooldown reduction, Nearby enemies suffer −20% attack spee.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Nashor's Tooth")){
						stat += 25;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+25% cooldown reduction", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Randuin's Omen")){
						stat += 5;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+5% cooldown reduction, 20% chance on being hit by an auto attack to slow the attacker's movement and attack speed by 35% for 3 seconds.", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Slows movement speed and attack speed of surrounding units by 35% for 2 seconds + 0.5 seconds for every 100 armor and magic resistance. 60 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Hextech Sweeper")){
						stat += 10;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "10% cooldown reduction, Your spell damage grants vision of your target for 4 seconds.", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Covers an area with stealth-detecting mist for 6 seconds, granting vision of units which pass through it for 6 seconds. 60 second cooldown.", stack);
						break;
					}
				}
			}
		}else if(option.equals("spell_vamp")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Hextech Revolver")){
						stat += 12;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+12% spell vamp.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Will of the ancients")){
						stat += 20;
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby allied champions gain +30 ability power and +20% spell vamp.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Hextech Gunblade")){
						stat += 20;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+20% spell vamp.", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Deals 300 magic damage and slows the target champion by 50% for 3 seconds (700 range). 60 second cooldown.", stack);
						break;
					}
				}
			}
		}else if(option.equals("tenacity")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Mercury's Threads")){
						stat = 35;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+35 Tenacity", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Moonflair Spellblade")){
						stat = 35;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+35 Tenacity", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Eleisa's Miracle")){
						stat = 35;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+35 Tenacity", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Cloak and Dagger")){
						stat = 35;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+35 Tenacity", stack);
						break;
					}
				}
			}
		}else if(option.equals("move_speed")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Boots of Mobility")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "When out of combat for 5 seconds the effect of these boots is increased to Enhanced Movement +5", stack);
						break;
					}
				}
			}
		}else if(option.equals("armor")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Ninja Tabi")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "All non-turret base attack damage is reduced by 10%.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Warden's Mail")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "20% chance on being hit by an autoattack to reduce attacker's movement speed and attack speed by 35% for 3 seconds.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Aegis of the Legion")){
						stat = 12;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Thornmail")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "On being hit, returns 30% of damage, before any reductions such as armor, as magic damage. At least 15 damage must be received.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Guardian Angel")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Revives your champion upon death, restoring 750 health and 375 mana. 5 minute cooldown.", stack);
						break;
					}
				}
			}
		}else if(option.equals("ap")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Mejai's Soulstealer")){
						addUniqueItemOfStack(context, passive, BuilderItem.item_id[i], "Your champion gains 8 ability power per stack, receiving 2 stacks for a kill or 1 stack for an assist. This effect can stack 20 times; you lose a third of your stacks if you die. At 20 stacks, your champion gains 15% cooldown reduction.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Will of the ancients")){
						stat += 30;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Guinsoo's Rageblade")){
						addUniqueItemOfStack(context, passive, BuilderItem.item_id[i], "On cast or hit, you gain +6 ability power and +4% attack speed for 5 seconds (maximum 8 stacks).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Abyssal Scepter")){
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby enemy champions suffer −20 magic resistance.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Rod of Ages")){
						addUniqueItemOfStack(context, passive, BuilderItem.item_id[i], "Upon leveling up, restores 250 health and 200 mana over 8 seconds.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Rylai's Cristal Scepter")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your spell damage will slow the target by 35% for 1.5 seconds (15% for multi-target spells, damage-over-time spells and spells with a cooldown time below 3 seconds).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Zhonya's Hourglass")){
						addUniqueItem(context, active, BuilderItem.item_id[i], "Places your champion into stasis for 2 seconds, rendering you invulnerable and untargetable but unable to take any actions. 90 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Lich Bane")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "On cast, your next physical attack will deal extra damage equal to 100% of your ability power. 2 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("The Hex Core")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+3 ability power per level", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Augment: Power")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+3 ability power per level, Power Transfer increases  Viktor's movement speed by 30% for 3 seconds.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Augment: Graviton")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+3 ability power per level, Gravity Field has an additional 30% cast range.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Augment: Death")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+3 ability power per level, Death Ray sets fire to enemies, dealing 30% additional magic damage over 4 seconds.", stack);
						break;
					}
				}
			}
		}else if(option.equals("damage")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Madred's Razors")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "On hit, 20% chance for target minion/monster to suffer 300 magic damage.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("The Bloodthirster")){
						addUniqueItemOfStack(context, passive, BuilderItem.item_id[i], "Gain +1 attack damage and +0.2% life steal per kill (maximum +40 attack damage and +8% life steal). Half of the bonuses are lost upon death.", stack);
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Sheen")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "On cast, for 10 seconds, your next standard attack deals extra damage equal to 100% of your base attack damage. 2 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Phage")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks have a 25% chance to slow your target's Movement Speed by 30% for 2.5 seconds.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Executioner's Calling")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "On-hit, you cause 4 damage per second for 8 seconds.", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Inflicts target enemy champion with Grievous Wound, causing 50% reduced healing and regeneration for 8 seconds (20 second cooldown).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Sword of the Occult")){
						addUniqueItemOfStack(context, passive, BuilderItem.item_id[i], "Your champion gains +5 damage per stack, receiving 2 stacks for a kill or 1 stack for an assist. This effect can stack 20 times; you lose a third of your stacks if you die. At 20 stacks, your champion gains +15% movement speed.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Wriggle's Lantern")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "On hit, 20% chance for target minion/monster to suffer 425 magic damage.", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Places a  Sight Ward at target location. 3 minute cooldown. (600 cast range).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Hexdrinker")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "If you would take magic damage which would leave you at less than 30% of your maximum health, You gain a shield which absorbs up to 250 magic damage for 5 seconds. 60 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Bilgewater Cutlass")){
						addUniqueItem(context, active, BuilderItem.item_id[i], "Target champion suffers 150 magic damage and is slowed by 50% for 3 seconds. 60 second cooldown and 400 range.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Manamune")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "2% of your maximum mana is converted to attack damage.Unique: On hit, you gain +1 maximum mana (maximum +1000 maximum mana). 3 second cooldown.Unique: On cast, you gain +4 maximum mana (contributes to same maximum). 3 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Aegis of the Legion")){
						stat = 8;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Sword of the Divine")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Every fourth basic attack deals 100 bonus magic damage", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "For 8 seconds, you gain +30 armor penetration and your basic attacks cannot be dodged. 40 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("The Black Cleaver")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks reduce your target's armor by 15 for 5 seconds (maximum 3 stacks).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Frozen Mallet")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks slow your target's Movement Speed by 40% for 2.5 seconds. (30% for ranged attacks).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Madred's Bloodrazor")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks deal bonus magic damage equal to 4% of the target's maximum health (maximum 120 versus monsters).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Trinity Force")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks have a 25% chance to slow your target's Movement Speed by 35% for 2.5 seconds,After using an ability, your next basic attack deals bonus physical damage equal to 150% of your base Attack Damage. 2 second cooldown. Does not stack with Sheen or Lich Bane.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Maw of Malmortius")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], " +1 Attack Damage for every 2.5% health missing. If you would take magic damage which would leave you at less than 30% of your maximum health, you gain a shield which absorbs 400 magic damage for 5 seconds. 60 second cooldown. Summoner Spells", stack);
						break;
					}
				}
			}
		}else if(option.equals("mana_regen")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Mana Manipulator")){
						stat += 7.2;
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby allied champions gain +7.2 mana regeneration.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Chalice of Harmony")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Increases your mana regeneration by 1% per 1% mana you are missing.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Soul Shroud")){
						stat += 12;
						break;
					}
				}
			}
		}else if(option.equals("mana")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Tear of the Goddess")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Each time your champion uses an ability they gain 4 maximum mana. This effect can't occur more than twice every 6 seconds. Bonus caps at 1000 mana.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Catalyst the Protector")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Upon leveling up, restores 250 health and 200 mana over 8 seconds.", stack);
						break;
					}
				}
			}	
		}else if(option.equals("health_regen")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Emblem of Valor")){
						stat += 10;
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby allied champions gain +10 health regeneration.", stack);
						break;
					}
				}
			}
		}else if(option.equals("health")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Leviathan")){
						addUniqueItemOfStack(context, passive, BuilderItem.item_id[i], "Your champion gains 32 health per stack, receiving 2 stacks for a kill and 1 stack for an assist. This effect can stack 20 times; you lose a third of your stacks if you die. At 20 stacks, your champion takes 15% less damage.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Sunfire Cape")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Deals 40 magic damage per second to nearby enemies.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Odyn's Veil")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Reduces and stores 10% of the magic damage dealt to your champion", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Deals 200 + (stored magic) [max: 400] to nearby enemy units. 90 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Prospector's Blade") || ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Prospector's Ring")){
						stat += 200;
						addUniqueItem(context, passive, BuilderItem.item_id[i], "+200 health (does not stack with other Prospector items)", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Entropy")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "25% chance on hit to reduce your target's movement speed by 30% for 2.5 seconds.", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "For 5 seconds, your attacks reduce your target's movement speed by 30% and deal 80 true damage over 2.5 seconds. 60 second cooldown", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Locket of the Iron Solari")){
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby allied champions gain 15 health regen per 5 seconds", stack);
						addUniqueItem(context, active, BuilderItem.item_id[i], "Shield yourself and nearby allies for 5 seconds, absorbing up to 50 (+10 per level) damage. 60 second cooldown.", stack);
						break;
					}
				}
			}
		}else if(option.equals("gold_regen")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Heart of Gold")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Gain +5 gold per 10 seconds.", stack);
						stat += 5;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Avarice Blade")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Gain +5 gold per 10 seconds.", stack);
						stat += 5;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Kage's Lucky Pick")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Gain +5 gold per 10 seconds.", stack);
						stat += 5;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Philosopher's Stone")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Gain +5 gold per 10 seconds.", stack);
						stat += 5;
						break;
					}
				}
			}
		}else if(option.equals("mr")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Quicksilver Sash")){
						addUniqueItem(context, active, BuilderItem.item_id[i], "Removes all debuffs from your champion. 90 second cooldown.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Malady")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks deal 20 bonus magic damage and reduce magic resistance by 6 for 8 seconds (maximum 4 stacks).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Aegis of the Legion")){
						stat = 15;
						addUniqueItem(context, aurora, BuilderItem.item_id[i], "Nearby allied champions gain +12 armor, +15 magic resist, and +8 attack damage.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Wit's End")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks deal 42 bonus magic damage and you gain +5 magic resistance for 5 seconds (maximum 4 stacks).", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Banshee's Veil")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Blocks one negative spell every 45 seconds.", stack);
						break;
					}
				}
			}
		}else if(option.equals("attack_speed")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Zeke's Herald")){
						stat += 20;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Ionic Spark")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Every fourth basic attack unleashes a chain lightning, dealing 110 magic damage to up to 4 targets.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("The Lightbringer")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks grant vision of your target for 5 seconds.", stack);
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Kitae's Bloodrazor")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks deal magic damage equal to 2.5% of the target's maximum health.", stack);
						break;
					}
				}
			}
		}else if(option.equals("life_steal")){
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Zeke's Herald")){
						stat += 12;
						break;
					}
				}
			}
			for(int i = 0; i < BuilderItem.item_id.length; i++){
				if(BuilderItem.item_id[i] != -1){
					if(ItemData.items.get(BuilderItem.item_id[i]).name_en.equals("Sanguine Blade")){
						addUniqueItem(context, passive, BuilderItem.item_id[i], "Your basic attacks grant +5 attack damage and +1% life steal for 4 seconds (maximum 7 stacks).", stack);
						break;
					}
				}
			}
		}
		return stat;
	}
}
